#include<bits/stdc++.h>
#define XH(i,a,b) for(int i=a;i<b;++i)
#define XXH(i,a,b) for(int i=a-1;i>=b;--i)
#define LL long long
using namespace std;
int tmpINT; string tmpSTRING; char tmpCHAR; double tmpDOUBLE; LL tmpLONGLONG;

int main(){
	LL N,X;cin>>N>>X;
	vector<LL>v;
	for(LL i=0;i<N;++i){
		scanf("%I64d", &tmpLONGLONG);
		if(tmpLONGLONG == X)continue;
		else v.emplace_back(tmpLONGLONG);
	}
	for (LL i = 0; i < v.size(); ++i)
	{
		printf("%I64d%c", v[i],i==v.size()-1?'\n':' ');
	}
	return 0;
}